package com.jiazhong.filters;

import javax.servlet.*;
import java.io.IOException;

/**
 * @Auther:shuXin
 */
public class Filter1 implements Filter {
    @Override
    public void init(FilterConfig filterConfig) throws ServletException {

    }

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        System.out.println("过滤器1 在链式调用的 doFilter 代码中被调用(放行之前)");

        filterChain.doFilter(servletRequest, servletResponse);

        System.out.println("过滤器1 在链式调用的 doFilter 代码中被调用(放行之后)");
    }

    @Override
    public void destroy() {

    }
}
